package cn.jiyun.service.impl;

import cn.jiyun.mapper.CouponInfoMapper;
import cn.jiyun.service.CouponInfoService;
import com.jiyun.Result.Result;
import com.jiyun.common.pojo.product.CouponInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class CouponInfoServiceImpl implements CouponInfoService {

    @Autowired
    private CouponInfoMapper couponInfoMapper;

    @Override
    public Result findCoupon() {
        List<CouponInfo> list = couponInfoMapper.findCoupon();
        return Result.ok(list);
    }

    @Override
    public Result findCouponUserList(String price) {
        List<CouponInfo> list = couponInfoMapper.findCouponUserList(price);
        return Result.ok(list);
    }
}
